perm filename CMPDES.TEX[PEG,DBL]6 blob
sn#506014 filedate 1980-04-22 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00008 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 % This file of formatting macros for the TEX technical text typesetting
C00004 00003 % Meta-character definition, math macros.
C00010 00004 % Font definitions.
C00015 00005 % Major section formats.
C00024 00006 % Other formatting macros.
C00033 00007 % Useful macros.
C00036 00008 % Page format, initialization.
C00039 ENDMK
C⊗;
% This file of formatting macros for the TEX technical text typesetting
% program is designed to produce, as closely as possible with the fonts
% available, the McGraw-Hill book style "Computer Design" (in the
% 6 7/16" by 9 1/4" size; with minor modification, it will also produce
% the 6" by 9" size). It was written during the summer and fall of
% 1979 by Phil Gerring, working for Douglas B. Lenat and K. Randall
% Davis. Most of the macros are well-documented, given a basic famili-
% arity with TEX, and their use should be clear in the context of the
% McGraw-Hill design booklet "Computer Design" (College Division, McGraw-
% Hill Book Company).
% Meta-character definition, math macros.
\chcode'173←1 \chcode'176←2 \chcode'44←3 \chcode'26←4 % defines meta-
\chcode'45←5 \chcode'43←6 \chcode'136←7 \chcode 1←8 % characaters
\def\lft#1{#1\hfill} % various useful leftifying, rightifying,
\def\ctr#1{\hfill#1\hfill} % etc. macros
\def\rt#1{\hfill#1}
\def\top#1{#1\vfill}
\def\mid#1{\vfill#1\vfill}
\def\bot#1{\vfill#1}
\def\rjustline#1{\hbox to size{\hskip0pt plus1000cm minus1000cm #1}}
\def\ljustline#1{\hbox to size{#1\hskip0pt plus1000cm minus1000cm}}
\def\ctrline#1{\hbox to size{\hskip0pt plus1000cm minus1000cm #1\hskip0pt
plus1000cm minus1000cm}}
\def\null{\hbox{}} % inserts one blank line (in vertical mode)
\def\trace{\chpar0←} \def\jpar{\chpar1←} \def\ragged{\chpar8←}
% The following are taken directly from {SU-AI}ACPHDR.TEX[TEX,DEK]; details
% on their use can be found in the TEX manual (S.U. C.S.D. Report
% No. STAN-CS-78-675; SAIL Memo AIM-317);
\def\log{\mathop{\char'154\char'157\char'147}\limitswitch}
\def\lg{\mathop{\char'154\char'147}\limitswitch}
\def\ln{\mathop{\char'154\char'156}\limitswitch}
\def\lim{\mathop{\char'154\char'151\char'155}}
\def\limsup{\mathop{\char'154\char'151\char'155\,\char'163\char'165\char'160}}
\def\liminf{\mathop{\char'154\char'151\char'155\,\char'151\char'156\char'146}}
\def\sin{\mathop{\char'163\char'151\char'156}\limitswitch}
\def\cos{\mathop{\char'143\char'157\char'163}\limitswitch}
\def\tan{\mathop{\char'164\char'141\char'156}\limitswitch}
\def\cot{\mathop{\char'143\char'157\char'164}\limitswitch}
\def\sec{\mathop{\char'163\char'145\char'143}\limitswitch}
\def\csc{\mathop{\char'143\char'163\char'143}\limitswitch}
\def\max{\mathop{\char'155\char'141\char'170}}
\def\min{\mathop{\char'155\char'151\char'156}}
\def\sup{\mathop{\char'163\char'165\char'160}}
\def\inf{\mathop{\char'151\char'156\char'146}}
\def\det{\mathop{\char'144\char'145\char'164}}
\def\exp{\mathop{\char'145\char'170\char'160}\limitswitch}
\def\Pr{\mathop{\char'120\char'162}}
\def\gcd{\mathop{\char'147\char'143\char'144}}
\def\lcm{\mathop{\char'154\char'143\char'155}}
\def\ldots{{.\≥.\≥.}}
\def\cdots{{\char'401\≥\char'401\≥\char'401}}
\def\ldotss{{.\≥.\≥.\≥}}
\def\cdotss{\cdots\≥}
\def\ldotsm{{\≥.\≥.\≥.\≥}}
\def\vdots{\vbox{\baselineskip 4pt\vskip 6pt\hbox{.}\hbox{.}\hbox{.}}}
\def\leftset{\mathopen{\{\,}}
\def\rightset{\mathclose{\,\}}}
\def\neqv{\mathrel{\not≡}}
\def\%{\char'45 } % use "\%" to ge a % sign, not just "%"!
\def\deg{↑{\hbox{\hskip-1pt\:w\char5}}} % use in math mode
\def\choose{\comb()}
\def\mod{\<\,\mathbin{\char'155\char'157\char'144}\penalty900\<\,}
\def\modulo#1{\penalty0\;(\char'155\char'157\char'144\char'165\char'154\char'157
\,\,#1)}
\def\cpile#1{\vcenter{\halign{\hfill$## $\hfill\cr#1}}}
\def\lpile#1{\vcenter{\halign{$## $\hfill\cr#1}}}
\def\rpile#1{\vcenter{\halign{\hfill$## $\cr#1}}}
\def\eqalign#1{\vcenter{\halign{\hfill$\dispstyle{##}$⊗$\dispstyle{\null##}$\hfill
\cr#1}}}
\def\eqalignno#1{\vbox{\tabskip 0pt plus 1000pt minus 1000pt
\halign to size{\hfill$\dispstyle{##}$\tabskip 0pt
⊗$\dispstyle{\null##}$\hfill\tabskip 0 pt plus 1000pt minus 1000pt
⊗\hfill$ ##$\tabskip 0pt\cr#1}}}
\def\twoline#1#2#3{\halign{\hbox to size{##}\cr\quad$\dispstyle{#1}$\hfill\cr
\noalign{\penalty 1000\vskip#2}\hfill$\dispstyle{#3}$\quad\cr}}
\def\chop to#1pt#2{\hbox{\lower#1pt
\null\vbox{\hbox{\lower100pt\hbox{\raise100pt
\hbox{$\dispstyle{#2}$}}}\vskip-100pt}}} % pretends that #2 is #1pt deep
\def\spose#1{\hbox to 0pt{#1 \hskip 0pt minus 10000000pt}}
% Font definitions.
% "Standard" TEX cmr fonts:
\font @=cmathx \font a=cmr10 \font b=cmr9 \font c=cmr8
\font d=cmr7 \font e=cmr6 \font f=cmr5 \font g=cmi10
\font h=cmi9 \font i=cmi8 \font j=cmi7 \font k=cmi6
\font l=cmi5 \font m=cmsc10 \font n=cms10 \font o=cms9
\font p=cms8 \font q=cmb10 \font r=cmb9 \font s=cmb8
\font t=cmtt \font u=cmsy10 \font v=cmsy9 \font w=cmsy8
\font x=cmsy7 \font y=cmsy6 \font z=cmsy5 \font ;=cmtitl
\font <=cmssb \font ==cmss12 \font >=cmss8 \font ?=cmsss8
% Other fonts:
\font A=cmr28[peg,dbl] \font B=cmr22[peg,dbl]
\font C=cmss18[peg,dbl]
% These three fonts were made by FSCALEing up cmr10 and cmss12 and
% hence are very rough. Somebody should replace them with METAFONTed
% ones.
% Needed:
% 9pt bold sans-serif (use cmssb?)
% 10pt bold italic
% these sizes give output suitable for photo-reduction (77%):
\def\curhsize{29pc }
\def\curvsize{45pc }
\def\curtotvsize{47pc }
\hsize \curhsize \vsize \curvsize
\maxdepth 2pt \parindent 20pt \topbaseline 10pt
\parskip 0pt plus 1 pt \lineskip 1pt
\topskip 2pt plus 2pt minus 1pt \botskip 2pt plus 2pt minus 1pt
\def\fnoteraise{4pt}
\def\tenpoint{\baselineskip 12pt \dispskip 12pt plus 3pt minus 9pt
\dispaskip 0pt plus 3pt \dispbskip 7pt plus 3pt minus 4pt
\def\rm{\:a} \def\sl{\:n} \def\bf{\:q} \def\it{\:g}
\def\biglp{\mathopen{\vcenter{\hbox{\:@\char'0}}}}
\def\bigrp{\mathclose{\vcenter{\hbox{\:@\char'1}}}}
\def\9{\hskip 5pt} \def\fnoteraise{4pt}
\mathrm adf \mathit gjl \mathsy uxz \rm}
\def\ninepoint{\baselineskip 11pt \dispskip 11pt plus 3pt minus 8pt
\dispaskip 0pt plus 3pt \dispbskip 6pt plus 3pt minus 3pt
\def\rm{\:b} \def\sl{\:o} \def\bf{\:r} \def\it{\:h}
\def\biglp{\mathopen{\hbox{\:a(}}}
\def\bigrp{\mathclose{\hbox{\:a)}}}
\def\9{\hskip 4.625pt} \def\fnoteraise{3pt}
\mathrm bef \mathit hkl \mathsy vyz \rm}
\def\eightpoint{\baselineskip 9pt \dispskip 9pt plus 3pt minus 7pt
\dispaskip 0pt plus 3pt \dispbskip 5pt plus 3pt minus 2pt
\def\rm{\:c} \def\sl{\:p} \def\bf{\:s} \def\it{\:i}
\def\biglp{\mathopen{\hbox{\:a(}}}
\def\bigrp{\mathclose{\hbox{\:a)}}}
\def\9{\hskip 4.25pt} \def\fnoteraise{2pt}
\mathrm cef \mathit ikl \mathsy wyz \rm}
\mathex @
\def\tt{\:t} % 10pt typewriter font
\def\sc{\:m} % 10pt small caps font
\def\ttl{\:;} % "cmttl" font for titles; use uppercase only
\def\bigglp{\mathopen{\vcenter{\hbox{\:@\char'22}}}}
\def\biggrp{\mathclose{\vcenter{\hbox{\:@\char'23}}}}
\def\biggglp{\mathopen{\vcenter{\hbox{\:@\char'40}}}}
\def\bigggrp{\mathclose{\vcenter{\hbox{\:@\char'41}}}}
\def\qquad{\hskip 20pt}
\def\xskip{\hskip 7pt plus 3pt minus 4pt}
\def\yskip{\penalty-50\vskip 3pt plus 3pt minus 2pt}
\def\yyskip{\penalty-100\vskip 6pt plus 6pt minus 4pt}
\def\sectionskip{\penalty-200\vskip 18pt plus 3pt minus 2pt}
\def\subsectionskip{\penalty-200\vskip 10pt plus 2pt minus 1pt}
\def\dimsectionskip{\penalty-200\vskip 12pt plus 3pt minus 2pt}
% Major section formats.
\def\titlepage{\gdef\tpage{T}} % \titlepage sets tpage to T
\def\runninglefthead#1{ % \runninglefthead sets lhead
\gdef\lhead{\uppercase{#1}}}
\def\runningrighthead#1{ % \runningrighthead sets rhead
\gdef\rhead{\uppercase{#1}}}
\def\partbegin#1{\titlepage % to begin a part
\setcount3 1 % count3 for footnotes
\vskip -2.9pc \vskip 9pc \rjustline{{\:C #1}}\vskip -4pt \vskip 2.5pc}
% Note: #1 will be "Part One", "Part Two", etc. (numbers spelled out)
\def\parttitle#1{\runninglefthead{#1}\baselineskip 32pt}
% Note:
% #1 is the part title; after this macro is called, the title will
% have to be hand-set in 28pt cmr, each line right-justified (using
% \rjustline) so that no line is longer than 23pc; then a \vskip of
% enough space to put the first line of epigraph or text 28pc from
% the top of the page (i.e., leaving 19pc of space for text)
% Note: the first paragraph in the part should be set \noindent, and
% a \runningrighthead should be used to set rhead;
% #1 should be all CAPITALS.
\def\chapbegin#1{\titlepage % to begin a chapter
\gdef\chapnum{#1--} \setcount3 1 % count3 for footnotes
\vskip -3pc \vskip 9pc \rjustline{{\:= Chapter #1}} \vskip -2pt \vskip 2pc}
% Note: a call to this macro will look like
% "\chapterbegin{1}"; Arabic numerals used for ch. numbers
\def\chaptertitle#1{
\runningrighthead{\uppercase{#1}}\baselineskip 24pt}
% Note:
% #1 is the chapter title; after this macro is called, the title will
% have to be hand-set in 22pt cmr, each line right-justified (using
% \rjustline) so that no line is longer than 23pc; then a \vskip of
% enough space to put the first line of epigraph or text 28pc from
% the top of the page (i.e., leaving 19pc of space for text). If,
% below the epigraph, there is not enough space for at least 6 lines
% of text, adjust the space between the chapter title and the epigraph
% until there are 6 lines of actual text.
% Note: the first paragraph in the chapter should be set \noindent;
% #1 should be all CAPITALS.
\def\appnxbegin#1{\titlepage % to begin an appendix
\setcount3 1 % count3 for footnotes
\vskip -2.9pc \vskip 9pc \rjustline{{\:C #1}}\vskip -4pt \vskip 2.5pc}
% Note: #1 will be "Appendix One", "Appendix Two", etc.
% Note: Appendices are set in 9pt (\ninepoint) type
\def\appnxnumber#1{\gdef\chapnum{#1--}}
% Note: This must be called before the text of the appendix starts.
% #1 is the (Arabic) number of the appendix.
\def\appnxtitle#1{\runningrighthead{#1}\baselineskip 32pt}
% Note:
% #1 is the appendix title; after this macro is called, the title will
% have to be hand-set in 28pt cmr, each line right-justified (using
% \rjustline) so that no line is longer than 23pc; then a \vskip of
% enough space to put the first line of epigraph or text 28pc from
% the top of the page (i.e., leaving 19pc of space for text)
% Note: the first paragraph in the part should be set \noindent, and
% a \runningrighthead should be used to set rhead;
% #1 should be all CAPITALS.
% Note: in all of the section-formatting macros below, DO NOT leave a blank line
% after the xxxsectionbegin(mumble); this will result in an extra blank line
% between the heading and the text.
\def\unnsectionbegin#1{\hbox{\uppercase{\:<#1}\hfill}
\penalty 1000 \vskip 9pt \penalty 1000
\runningrighthead{\uppercase{#1}}\tenpoint\noindent\!}
% Note: most of the time, this must be preceded by \sectionskip
\def\sectionbegin[#1]#2{\hbox{\uppercase{\:<\chapnum #1\quad #2}\hfill}
\penalty 1000 \vskip 9pt \penalty 1000
\runningrighthead{\uppercase{#2}}\tenpoint\noindent\!}
% Note: most of the time, this must be preceded by \sectionskip
\def\lsectionbegin[#1]#2#3#4{ % "l" for "long-titled"
\ljustline{\uppercase{\:<\chapnum #1\quad #3}}
\ljustline{\uppercase{\:< #4}}
\penalty 1000 \vskip 9pt \penalty 1000
\ifeven#2{
\runningrighthead{\uppercase{#4}}}
\else{
\runningrighthead{\uppercase{#3}}}
\tenpoint\noindent\!}
% Note: most of the time, this must be preceded by \sectionskip
% This macro is used when a section title must be broken into
% two lines. #1 is the section number, #2 is either 1 or 2,
% meaning that either the first half of the head or the second
% half is to be used as the running right head, and #3 and #4
% are the first and second parts of the head.
\def\unnsubsectionbegin#1{\subsectionskip \penalty -200
\hbox{{\:< #1\hfill}}
\penalty 1000 \vskip 5pt plus 1pt \penalty 1000
\tenpoint\noindent\!}
% #1 should be both caps and lowercase (i.e., normal)
\def\subsectionbegin[#1]#2{\subsectionskip\penalty -200
\hbox{{\:<\chapnum #1\quad #2\hfill}}
\penalty 1000 \vskip 5pt plus 1pt \penalty 1000
\tenpoint\noindent\!}
% #2 should be both caps and lowercase
\def\lsubsectionbegin[#1]#2#3{ % "l" for "long-titled"
\subsectionskip\penalty -200
\hbox{{\:<\chapnum #1\quad #2\hfill}}\penalty 1000
\ljustline{{\:< #3}}
\penalty 1000 \vskip 5pt plus 1pt \penalty 1000
\tenpoint\noindent\!}
% #2, #3 should be both caps and lowercase
\def\dimsectionbegin#1{\dimsectionskip \tenpoint{\bf #1}\quad\!}
\def\minsectionbegin#1{\par\tenpoint{\bf #1}\quad\!}
% Note: \minsectionbegin should use italic bold face
% Other formatting macros.
\chcode'15←12%
\def\nofill{\trace'344\chcode'15←12\chcode '40←13%
\gdef\line##1
{\par\noindent##1\line}\line}%
\def\endnofill{\par\chcode'15←5\chcode'40←10\trace'345%
\gdef\line{}}%
\chcode'15←5%
\def\epigraph#1{ % for text of quotations
\ninepoint\noindent{\sl #1\par}
\penalty1000\vskip 6pt\penalty1000}
\def\author#1{\ljustline{\rm #1}} % for author of quotation
\def\source#1{\ljustline{\sl #1}} % for source of quotation
\def\epigraphend{\vskip 18pt \tenpoint} % ends the quotation
\def\bibentry{ % format for bibliography entries
\hangindent 20pt after 1 \noindent\!}
\def\startrefs{\ninepoint\setcount4 1} % use just before a reference list
\def\reference{ % format for numbered references
\ljustline{{\bf\count4}} % (in a reference list)
\advcount4 \vskip -11pt
\hangindent 20pt after 0 \noindent\!}
\def\endrefs{\tenpoint} % use just after a reference list
% The following two footnote macros are used in DBL's half of the book. I
% don't particularly like them, and used the ones below for KRD's half.
\def\ffootnote#1#2{ % for the first footnote on a page
\hbox{$\?\hbox{\rm #1}↑{\hbox{\:e\count3}}\?$}
\botinsert{
\null \vskip 14pt plus 4pt \baselineskip 9pt
\hbox par size{\hskip 20pt\raise 2pt\hbox{\:e \count3}
\eightpoint #2}
}
\advcount3}
\def\footnote#1#2{ % for subsequent footnotes on a page
\hbox{$\?\hbox{\rm #1}↑{\hbox{\:e\count3}}\?$}
\botinsert{
\baselineskip 9pt
\hbox par size{\hskip 20pt\raise 2pt\hbox{\:e \count3}
\eightpoint #2}
}
\advcount3}
\def\backskip{$\?$}
\def\ffnote#1{ % for the first footnote on a page
\penalty1000\hskip -2pt
\raise\fnoteraise\hbox{{\:e \count3}} % \hskip -2pt
\penalty -150 \backskip
\botinsert{
\null \vskip 14pt plus 4pt \baselineskip 9pt
\hbox par size{\hskip 20pt\raise 2pt\hbox{\:e \count3}
\eightpoint\rm #1}
}
\advcount3}
\def\fnote#1{ % for subsequent footnotes on a page
\penalty1000\hskip -2pt
\raise\fnoteraise\hbox{{\:e \count3}} % \hskip -2pt\penalty -170
\penalty -150 \backskip
\botinsert{
\baselineskip 9pt
\hbox par size{\hskip 20pt\raise 2pt\hbox{\:e \count3}
\eightpoint\rm #1}
}
\advcount3}
\def\fnotevfix{\par\vskip -12pt} % To fix end-of-para footnotes
% (use only as needed)
\def\fnotepara#1{ % If a footnote has more than one paragraph, use
\botinsert{ % this macro for the second+ paragraph(s)
\baselineskip 9pt
\hbox par size{\hskip 20pt \eightpoint\rm #1}}}
\def\sourcenote#1{ % for a source note
\botinsert{
\null \vskip 14pt plus 4pt \baselineskip 9pt
\hbox par size{\hskip 20pt{\eightpoint{\rm #1}}}
}}
\def\extractbegin{ % to begin an extract or long quote
\vskip 14pt plus 4pt minus 2pt \ninepoint
\hangindent 20pt after 0 \noindent\!}
\def\extractpara{ % for second, third,... paragraph in extract
\hangindent 20pt after 0}
\def\extractend{ % to end an extract or long quote
\par \vskip 14pt plus 4pt minus 2pt \tenpoint}
\def\listskip{ % space between text and lists
14pt plus 4pt minus 2pt}
\def\listbegin{\vskip \listskip} % to start an unindented list
\def\listend{\vskip \listskip % to end an unindented list
\baselineskip 12pt}
\def\nestlistbegin{ % to begin a nested list
\yskip \advcount2 by \indlistindent \ninepoint}
\def\nestlistend{ % to end a nested list
\yyskip \advcount2 by -\indlistindent \tenpoint}
\def\indlistindent{20} % indentation for lists (in points)
\def\indlistbegin{ % to start an indented list
\vskip \listskip \advcount2 by \indlistindent}
\def\indlistend{ % to end an indented list
\vskip \listskip \advcount2 by -\indlistindent}
% Note: indented lists may be nested, and should be set in 9pt cmr
% (i.e., say \ninepoint before the list and \tenpoint after it)
\def\numlistentry[#1]#2{ % for a numbered list entry
\baselineskip 11pt
\hangindent \count2 pt after 0 {\bf #1}\quad #2\par}
% Note: #1 is the number, surrounded by square brackets, and it must be
% at least two characters long; for single digits, use [ 1], [ 2], etc.
\def\unnlistentry#1{ % for an unnumbered list entry
\baselineskip 11pt
\hangindent \count2 pt after 0 #1\par}
\def\bullistentry#1{ % for an bulleted list entry
\baselineskip 11pt
\hangindent \count2 pt after 0\noindent\hbox to 20pt{}
\hskip 4pt $\bullet$\quad #1\par}
\def\hddlistentry[#1]#2{ % for a headed list entry--
\baselineskip 11pt
\hangindent \count2 pt after 0 {\sl #1}\quad #2\par}
% Note: #1 is the heading; it will be set in slanted type
\def\listentpara{ % for second, third, ... paragraph
\baselineskip 11pt % in a list entry
\hangindent \count2 pt after 0}
\def\figtitle #1-#2#3{{\baselineskip 9pt
\vskip 6pt
\hbox par size{\eightpoint {\bf Figure #1--#2} \quad #3}
\null}}
\def\tablenum #1-#2#3{
\hbox par size{\ninepoint\baselineskip 12pt
{\bf Table #1--#2\quad #3}}
\null}
% Useful macros.
\def\index#1{} % for when auto-indexing becomes available
\def\comment#1{} % for in-text comments
\def\ellipsis{$\ldots$} % ==> ...
\def\middot{\raise 2.5pt \hbox to 20pt{\hfill .\hfill}} % dot raised to middle
\def\star{\hbox to 0pt{\hskip 0pt minus 100pt *}}
\def\blackslug{\hbox{\hskip 1pt \vrule width 4pt height 6pt depth 1.5pt
\hskip 1pt}} % a black box for ending algorithms, etc.
\def\eg{{\it e.g.}} % italicized e.g., i.e., q.v., etc.
\def\ie{{\it i.e.}}
\def\qv{{\it q.v.}}
\def\vs{{\it vs.}}
\def\etal{{\it et al.}}
\def\filename#1{{\:m #1}} % small caps for filenames
\def\allcaps#1{{\:b #1}} % nine point for all-capitals words
\def\ac#1{\allcaps{#1}} % shorthand for the above macro
\def\cit[#1]{\penalty 500 \raise 3pt % raised text in square brackets for
\hbox{\eightpoint \rm [#1]}} % reference citations
\def\<#1>{{\:e<}#1{\:e>}} % useful for BNF-style < ... >
\def\topofpage{\null\vskip-12pt} % allows glue at top of page
\def\newpage{\vfill\eject\topofpage} % fills old page, starts new one
\def\worldend{\vfill \eject \end} % finishes page, ends input
\def\tablehead#1{\ctrline{\:<#1}\ninepoint}
\def\tableskip{ % space between text and in-text tables
14pt plus 4pt minus 2pt}
\def\caption Fig.\ #1.{\ninepoint{\bf Fig.\ #1.}\xskip\!}
\def\textindent#1{\noindent\hbox to 19pt{\hskip 0pt plus 1000pt minus 1000pt#1\
}\!}
\def\hang{\hangindent 19pt}
\def\understep#1{$\underline{\hbox{#1}}$} % for underlining things
\def\inv{$↑{-1}$} % whatever to the minus one
\def\minv{↑{-1}} % whatever to the minus 1, in math mode
\def\indentedline[#1]#2{ % indent a line by #1
\hbox par size{\hbox to #1{}#2}}
% Page format, initialization.
\def\tpage{F} \def\lhead{} \def\rhead{} % "global variables"
\def\chapnum{} \def\draft{F}
\output{\baselineskip 0pt\lineskip0pt % beginning of output routine, resets skips
\vbox to \curtotvsize{ % prepare the full page of this fixed height
\if T\tpage{ % used when tpage is "T" (title pages)
\vskip 22pt % blank space in place of headlines
\if T\draft{\corners}\else{}
\page % insert the page contents
\vfill} % fill up the page
\else{\baselineskip 8pt \null % empty line to position next baseline
\hbox to \curhsize{
\ifeven0{{\:>\count0} % put in page number, running head;
\hfill{\:>\lhead}} % left head for even pages, right
\else{{\:>\rhead}\hfill % for odd pages
{\:>\count0}} }
\null\vskip 5.5pt % position page 24pt from top
\page\vfill} % insert the page contents
} % completion of the \vbox
\if T\tpage
{\gdef\tpage{F} % reset tpage
\baselineskip 12pt\null % blank line before page number
\rjustline{\:>\count0}} % "drop folio" page number
\else{} % completion of if
\advcount0} % increase page number by 1 and end output routine
\def\corners{\vbox to 0pt{\baselineskip0pt\lineskip 0pt \vskip -24pt
\hbox to size{\vrule height .2pt width 11pt \hfill \vrule width 11pt}
\hbox to size{\vrule height 11pt width .2pt \hfill \vrule width .2pt}
\vfill}} % this will indicate true top corners on title page
\setcount0 0 % count0 for page numbers
\setcount2 0 % count2 for list indentation
\setcount3 1 % count3 for footnote numbers
\topofpage
\tenpoint
\rm
% if you want to change \vsize, you have to \eject the first page first